/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/03/17
* File: EffectBase.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#pragma once

namespace HY
{
class EffectManager;
class EffectTechnique;
class ParameterManager;
class Effect
{
	friend class EffectManager;
public:
	EffectManager* getEffectManager() const;
	ParameterManager* getParamManager() const;

	uint32 getFlags() const;
	uint32 addFlags(uint32 flags);
	uint32 deleteFlags(uint32 flags);
	void setFlags(uint32 flags);

	EffectTechnique* createTechnique(const std::string& name);
	uint32 getNumOfTechniques() const;

	bool loadByFilename(const std::string& file_name);

protected:
	Effect(EffectManager* mgr, const std::string& name);
	virtual ~Effect();

protected:
	ParameterManager*					param_mgr_;
	EffectManager*						eff_mgr_;
	std::string							name_;
	std::string							file_name_;
	uint32								flags_;
	std::vector<EffectTechnique*>		technique_list_;
};

}